package cn.kxm.dao;

import java.util.Date;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import cn.kxm.pojo.PurchaseOrderBill;

public interface PurchaseOrderBillDao {
    
	public List<Map<String, Object>> getPurchaseOrderBillByCompanyName(@Param("CompanyName")String CompanyName,
            @Param("currPage") Integer currPage,
            @Param("size") Integer size,
            @Param("fromDate") Date fromDate,
            @Param("endDate")Date endDate,
            @Param("code")String code);
	public int getPurchaseOrderBillByCompanyNameCount(@Param("CompanyName")String CompanyName,
	@Param("fromDate") Date fromDate,
	@Param("endDate")Date endDate,
	@Param("code")String code);
	List<PurchaseOrderBill> getAll(@Param("purchaseOrderBill")PurchaseOrderBill purchaseOrderBill,@Param("currentPageNo")Integer currentPageNo,
			@Param("pageSize")Integer pageSize);
	/**
	 * 根据条件查询订单数量
	 * @param purchaseOrderBill
	 * @return
	 */
	int getPurchaseOrderBillCount(@Param("purchaseOrderBill")PurchaseOrderBill purchaseOrderBill);
	/**
	 * 根据code查询信息
	 * @param code
	 * @return
	 */
	PurchaseOrderBill getByCode(@Param("code")String code);
	/**
	 * 添加采购订单
	 * @param purchaseOrderBill
	 * @return
	 */
	int addPurchaseOrderBillCount(@Param("purchaseOrderBill")PurchaseOrderBill purchaseOrderBill);
	/**
	 * 修改采购
	 * @param purchaseOrderBill
	 * @return
	 */
	int modifyPurchaseOrderBill(@Param("purchaseOrderBill")PurchaseOrderBill purchaseOrderBill);
	/**
	 * 删除采购订单
	 * @param code
	 * @return
	 */
	int delPurchaseOrderBill(@Param("code")String code);
	/**
	 * 修改采购订单入库状态
	 */
	public int updateOrderInstroageStatus(@Param("codes")List<String> codes,@Param("statusNum")Integer statusNum);
	
	public int modifyPurchaseOrderBillByCode_checkStatus(@Param("code") String code,@Param("checkStatus") Integer checkStatus);
}
